package com.musemun.controller;

import com.musemun.common.CommonResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

@RestController
@Api("登入模块，后面的头部需要带有token才能登入还没实现。只实现了返回token")
public class LoginController {

    @ApiOperation("获得token,登入成功")
    @PostMapping("/login_url")
    @CrossOrigin
    public CommonResult<String>getLogin(@RequestParam String username,@RequestParam String password){
        return new CommonResult<>(200,"登入失败");
    }

    @ApiOperation("注销登入")
    @PostMapping("/logout_url")
    public CommonResult<String>getLogout(){
        return new CommonResult<>(200,"注销失败");
    }

    @PostMapping("/fail_url")
    public CommonResult<String>getLogin(){
        return new CommonResult<>(500,"账号或密码错误");
    }
}

